home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / ascii < prev    next >
Text File  |  2001-03-21  |  1KB  |  35 lines

  1. Synopsis:
  2.    $ascii(<integer list>)
  3.    $chr(<character list>)
  4.  
  5. Technical:
  6.    This pair of function is used to convert between 8-bit characters and
  7.    their numeric equivalent (dependent on your locale).  The $ascii()
  8.    function converts from numeric to character, and $chr() converts from
  9.    characters to their numeric values.
  10.  
  11.    For $ascii(), integers in the range 0..255 are accepted for input.  For
  12.    $chr() any arbitrary list of characters is accepted.
  13.  
  14. Practical:
  15.    These functions are used to convert from character values to their
  16.    numeric values, and back.  One common use for these is to insert control
  17.    character into text without having to actually type them in; or to
  18.    check the case of a character.
  19.  
  20. Returns:
  21.    ascii: space-delimited list of integer values
  22.    chr:   concatenated list of characters
  23.  
  24. Examples:
  25.    /* assume iso8859-1 character set */
  26.    $ascii(abcABC)                     returns "97 98 99 65 66 67"
  27.    $chr(1 2 3)                        returns "ABC" (ctrl-A, -B, -C)
  28.    $chr($ascii(abcABC))               returns "abcABC"
  29.  
  30. Other Notes:
  31.    Some characters with the high bit set will return negative numeric
  32.    values from $ascii().  Add 256 to this negative value to get its
  33.    positive equivalent.  The $chr() function will accept either.
  34.  
  35.